package cn.com.netedge.iot.frontend.comm.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Configuration;

@Configuration
@RefreshScope
public class FeCommConfig {

    @Value("${frontEnd.ports}")
    private String ports;

    public static ApplicationContext appContext;

    private static String machineName;

    private static boolean localMode = false;

    public String getPorts() {
        return ports;
    }

    public static String getMachineName() {
        return machineName;
    }

    public static void setMachineName(String machineName) {
        FeCommConfig.machineName = machineName;
    }

    public static boolean isLocalMode() {
        return localMode;
    }

    public static void setLocalMode(boolean localMode) {
        FeCommConfig.localMode = localMode;
    }
}
